home *** CD-ROM | disk | FTP | other *** search
/ Interactive Media Design Review 1999 / Interactive Media Design Review 1999.iso / mac / files / ID99MENU.DIR / 00205_review shrink.ls < prev    next >
Encoding:
Text File  |  1999-04-29  |  485 b   |  22 lines

  1. property s, mypercent, mywidth, myheight
  2. global tickrate, stagedone
  3.  
  4. on beginSprite me
  5.   s = me.spriteNum
  6.   mypercent = 0
  7.   mywidth = the width of sprite s
  8.   myheight = the height of sprite s
  9. end
  10.  
  11. on prepareFrame me
  12.   set the width of sprite s to float(mywidth) / 100 * (100 - mypercent)
  13.   set the height of sprite s to float(myheight) / 100 * (100 - mypercent)
  14.   mypercent = min(100, mypercent + tickrate)
  15. end
  16.  
  17. on donestage me
  18.   if mypercent < 100 then
  19.     stagedone = 0
  20.   end if
  21. end
  22.